<!doctype html>
<html class="no-js">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="description" content="">
<meta name="keywords" content="">
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no, minimal-ui" />
<meta name="format-detection" content="telephone=no, email=no" />
<title>成为作者-能量时光-发现，分享你的智慧</title>
<meta name="renderer" content="webkit">
<meta http-equiv="Cache-Control" content="no-siteapp"/>
<meta name="mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<meta name="apple-mobile-web-app-title" content="能量时光"/>
<meta name="msapplication-TileColor" content="#0e90d2">
<link rel="stylesheet" href="css/amazeui.min.css">
<link rel="stylesheet" href="css/app.css">
</head>
<body>
<div class="am-join-vip" style="padding:0;">
	<img src="images/am-join-author-1.png" alt="">
	<img src="images/am-join-author-2.png" alt="">
	<img src="images/am-join-author-3.png" alt="">
	<img src="images/am-join-author-4.png" alt="">
	<img src="images/am-join-author-5.png" alt="">
	<img src="images/am-join-author-6.png" alt="">
	<img src="images/am-join-author-7.png" alt="">
	<img src="images/am-join-author-8.png" alt="">
	<img src="images/am-join-author-9.png" alt="">
	<img src="images/am-join-author-10.png" alt="">
	<div class="am-join-author">
        <p class="join-author-title">让知识变得有温度。用心服务传递能量、分享知识的作者，致力于打造国内最大的线上家庭教育平台。</p>
        <div class="am-join-author-ruzhu">
            <img src="images/am-join-author-ruzhu-img.png" alt="成为能量时光作者">
            <h3>成为能量时光的入驻作者,您将获得以下特权：</h3>
            <ul>
                <li>1.自由的分享您的教育观点；</li>
                <li>2.专业课程管理体系帮你匹配精准读者；</li>
                <li>3.精心打造个人主页，塑造个人品牌；</li>
                <li>4.通过积累晋升为专栏作者 获得收入。</li>
            </ul>
        </div>
        <div class="am-join-author-form">
            <h3><img src="images/am-join-author-tianxie-img.png" alt="成为能量时光作者"></h3>
            <form action="" id="edit_myfrom">
                <div class="author-from-list">
                    <label for="">姓名<em>*</em></label>
                    <input type="text" name="name" id="name" placeholder="输入您的姓名">
                </div>
                <div class="author-from-list">
                    <label for="">手机<em>*</em></label>
                    <input type="text" name="phone" id="phone" placeholder="输入手机号码">
                </div>
                <div class="author-from-list">
                    <label for="">邮箱</label>
                    <input type="text" name="email" id="email" placeholder="输入邮箱">
                </div>
                <div class="author-from-list">
                    <label for="">常驻城市</label>
                    <input type="text" name="city" id="city" placeholder="选择城市">
                </div>
                <div class="author-from-list">
                    <label for="">微信号</label>
                    <input type="text" name="wechat" id="wechat" placeholder="输入微信号">
                </div>
                <div class="author-from-list">
                    <label for="">QQ</label>
                    <input type="text" name="qq" id="qq" placeholder="输入QQ号">
                </div>
                <div class="author-from-list" style="height:60px;">
                    <label for="">个人简介</label>
                    <textarea name="intro" id="intro" maxlength="50" placeholder="写几句您的介绍吧。"></textarea>
                    <div class="numtj" id="numtj">
                        <span>0</span>/50
                    </div>
                </div>
            </form>
        </div>
        <a href="javascript:void(0);" title="" class="author-form-btn" >
            <img src="images/join-author-btn.png"  alt="提交作者"  style="margin-bottom: 20px">
        </a>
    </div>
</div>

<script src="js/jquery.min.js"></script>
<script src="js/amazeui.min.js"></script>
<script>
	$(document).keyup(function() {
		var text=$("#edit_myfrom textarea").val();
		var counter=0;
		var max = 100;
		$("#numtj span").text(text.length);
	});
	//添加
    $(".author-form-btn").on("click",function(){

        var
        name=$('#name').val(),
        phone=$('#phone').val(),
        email=$('#email').val(),
        city=$('#city').val(),
        wechat=$('#wechat').val(),
        qq=$('#qq').val(),
        intro=$('#intro').val();

        if(name==""){
            alert("姓名为空");
            return;
        }
        if(phone==""){
            alert("电话为空");
            return;
        }
        $.post('/author/add', {'name': name,'phone':phone,'email':email,'city':city,'wechat':wechat,'qq':qq,'intro':intro}, function (data) {
            if (data.code == 200) {
                alert('提交成功');
                setTimeout(function () {
                    window.location.href = '/site/index';
                }, 2000);
            } else {
                alert(data.info);
            }
        }, 'json');

    });
</script>
</body>
</html>